﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit.Sdk;

namespace Sgr
{
    public static class SkipHelper
    {
        // TODO: 通过配置文件或环境变量来控制是否启用

        /// <summary>
        /// 是否跳过S3测试
        /// </summary>
        public static void SkipIfS3TestsDisabled()
        {
            if (!EnableS3())
                throw SkipException.ForSkip("S3 服务不可用，跳过测试");
        }

        /// <summary>
        /// 是否跳过Redis测试
        /// </summary>
        public static void SkipIfRedisTestsDisabled()
        {
            if (!EnableRedis())
                throw SkipException.ForSkip("Redis服务不可用，跳过测试");
        }

        /// <summary>
        /// 是否启用S3测试
        /// </summary>
        /// <returns></returns>
        public static bool EnableS3()
        {
            return false;
        }

        /// <summary>
        /// 是否启用Redis测试
        /// </summary>
        /// <returns></returns>
        public static bool EnableRedis()
        {
            return false;
        }
    }
}